-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement dynamic font support /font/<name>/<start>-<end>
#755
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor things / nits, but otherwise solid.
This feature is what I looking forward 🤩 |
Want to make a test or some docs? |
Sure :D |
da0fb6b
to
bc7823b
Compare
Open Source Fonts Resources For Tests:
I believe we can use these two fonts for tests and my concern is the |
I add font test in test.sh in this PR |
This will NOT compile until stadiamaps/sdf_font_tools#13 is merged and published This implements dynamic font protobuf generation, allowing users to request font ranges on the fly, and combining them in any order, e.g. `Font1,Font2,Font3`, same as with sprites and tiles This is a first iteration, without any multithreading support. In theory, this could be done far faster by generating SDFs with multiple threads. Current steps: * during init, figure out all glyphs available in each font, and store them as a bitset * during request: * combine requested bitsets to figure out which glyph should come from which font file * load those glyphs from files (using a single instance of the freetype lib) * convert them to SDFs and package them into a protobuf
This implements dynamic font protobuf generation, allowing users to request font ranges on the fly, and combining them in any order, e.g.
Font1,Font2,Font3
, same as with sprites and tilesThis is a first iteration, without any multithreading support. In theory, this could be done far faster by generating SDFs with multiple threads.
Current process